package com.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.dao.PersonDao;
import com.example.entity.Person;
import com.example.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PersonServiceImpl implements PersonService {
    @Autowired
    private PersonDao personDao;

    @Override
    public Page<Person> findPage(Page<Person> page1, LambdaQueryWrapper<Person> queryWrapper) {
        return personDao.selectPage(page1,queryWrapper);
    }

    @Override
    public void del(Integer id) {

        personDao.deleteById(id);
    }
}
